package com.ml.mall.service.company;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ml.mall.bean.base.ApiRestResult;
import com.ml.mall.bean.req.company.CompanyLogisticsInfoDto;
import com.ml.mall.bean.req.company.CompanyLogisticsInfoEditDto;
import com.ml.mall.bean.req.company.CompanyLogisticsInfoQueryDto;
import com.ml.mall.bean.req.company.CompanyShippingDto;
import com.ml.mall.entity.company.SysCompanyLogisticsInfo;
import org.springframework.transaction.annotation.Transactional;

import java.math.BigDecimal;

public interface SysCompanyLogisticsInfoService extends IService<SysCompanyLogisticsInfo>{

    /**
     * @description: 根据公司Id 获取 运费
     * @author kyyang
     * @date 2021/5/27 21:07
     * @version 1.0
     */
    BigDecimal findDeliveryByCompanyId(Long companyId);

    @Transactional
    void editSupplierLogistics(CompanyLogisticsInfoEditDto companyLogisticsInfoEditDto);

    void editSupplierLogistics(CompanyLogisticsInfoDto companyLogisticsInfoDto, CompanyShippingDto companyShippingDto, Long id);

    BigDecimal findDeliveryMoqByCompanyId(Long companyId);

    SysCompanyLogisticsInfo findByCompanyId(Long companyId);

    boolean isCompletedLogisticsInfo(SysCompanyLogisticsInfo logisticsInfo);

    void checkLogisticsInfo(CompanyLogisticsInfoDto logisticsInfo);

    void saveSupplierLogistics(CompanyLogisticsInfoDto logisticsInfo, Long companyId);
}
